home *** CD-ROM | disk | FTP | other *** search
/ ASP Advantage 1993 / The Association of Shareware Professionals Advantage CD-ROM 1993.iso / files / commions / ca29_1 / ca29_1.exe / INSTALL.CMD < prev    next >
OS/2 REXX Batch file  |  1992-11-16  |  22KB  |  679 lines

  1.     SET TTHRU OFF        ; Must be 1st line to suppress typethrough
  2.     ON ESCAPE GOSUB Escape    ; Exit if ESC
  3. ;****    TRACE ON        ; Debugging
  4. ;
  5. ; ----- COM-AND INSTALL script for automatic execution
  6. ;    Commenced: 10/90 R.McG
  7. ; -----------------------------------------------------------------------
  8. ;    Purpose:
  9. ;       This script, named INSTALL.CMD, is executed automatically by
  10. ;    COM-AND after the load-time creation of the DFT file.  It may be
  11. ;    manually invoked through the F2 window at any time, as well.
  12. ; -----------------------------------------------------------------------
  13. ;
  14. ;    Initialization
  15. ;
  16.     LEGEND "Welcome..."
  17.     SET RDISP OFF        ; Ignore received chars
  18. ;
  19. ;    Establish a DWINDOW, and change the text display to window default.
  20. ;    .. Save the previous text display attribute, for restoration later.
  21. ;
  22.     DWIND 1,2 22,78     ; Establish scrolling region
  23.     N99 = "_TEXT"           ; Save original text attr
  24.     SET TEXT "_DEFA"        ; Set text attr
  25. ;
  26. ;    Perform tasks
  27. ;
  28. Again:
  29.     GOSUB Intro        ; Paint intro screen
  30.     GOSUB Set        ; Look at autoexec file
  31.     GOSUB Port        ; Select port for default use
  32.     GOSUB Speed        ; Select speed for default use
  33.     GOSUB Type        ; Select modem type
  34.     GOSUB Update        ; Ending "do it again?" query
  35.     IF FAILED GOTO Again
  36. ;
  37. ;    Save current settings
  38. ;
  39.     SET TEXT N99        ; Reset text attr for store
  40.     STORE DEFAULT        ; Update defaults
  41.     GOTO Almost        ; Skip Escape tests
  42. ;
  43. ;    Escape was hit - if runtime invocation, do the CODA.
  44. ;
  45. Escape:
  46.     IF STRCMP "_RUNT" "NO" GOTO Exit
  47. ;
  48. ;    Last words
  49. ;
  50. Almost:
  51.     ON ESCAPE GOSUB EXIT    ; New ESC processor
  52.     SET TEXT "_DEFA"        ; Set text attr
  53.     GOSUB Coda        ; Ending last words
  54. ;
  55. ;    Exit the script
  56. ;
  57. Exit:
  58.     SET TEXT N99        ; Reset text attr finally
  59.     DWINDOW CLEAR        ; Clear any scrolling region
  60.     CLEAR            ; Clear entire text window
  61.     EXIT
  62. ;
  63. ; ----- Subroutine: Intro -> introductory screen
  64. ;    .. note: BOX instead of WOPEN is used - allowing global ESC
  65. ;
  66. Intro:
  67.     BOX   0,0 23,79 (default)
  68.     ATSAY 0,2 (default)   " INSTALL intro "
  69.     ATSAY 23,25 (default) " Press ESC to cancel INSTALL "
  70.     LOCATE 2,2
  71.  
  72.     MESS "   ▓▓▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓  ▓▓▓   ▓▓▓             ▓▓▓▓▓▓▓  ▓▓     ▓▓  ▓▓▓▓▓▓▓  "
  73.     MESS "   ▓▓        ▓▓    ▓▓  ▓▓ ▓▓▓ ▓▓            ▓▓     ▓▓ ▓▓▓    ▓▓  ▓▓    ▓▓ "
  74.     MESS "   ▓▓        ▓▓    ▓▓  ▓▓  ▓  ▓▓            ▓▓     ▓▓ ▓▓ ▓   ▓▓  ▓▓    ▓▓ "
  75.     MESS "   ▓▓        ▓▓    ▓▓  ▓▓     ▓▓  ▓▓▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▓ ▓▓  ▓  ▓▓  ▓▓    ▓▓ "
  76.     MESS "   ▓▓        ▓▓    ▓▓  ▓▓     ▓▓            ▓▓     ▓▓ ▓▓   ▓ ▓▓  ▓▓    ▓▓ "
  77.     MESS "   ▓▓        ▓▓    ▓▓  ▓▓     ▓▓            ▓▓     ▓▓ ▓▓    ▓▓▓  ▓▓    ▓▓ "
  78.     MESS "   ▓▓▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓  ▓▓     ▓▓            ▓▓     ▓▓ ▓▓     ▓▓  ▓▓▓▓▓▓▓  "
  79.     MESS " "
  80. ;
  81. ;    Add introductory text
  82. ;
  83.     IF STRCMP "_RUNT" "YES"
  84.        MESS "COM-AND has created a file named COM-AND.DFT for default values.  This means"
  85.        MESS "that this is the first time COM-AND has executed under these conditions.  A"
  86.        MESS "script (INSTALL.CMD) included with the COM-AND release will help install the"
  87.        MESS "settings you will use in this and subsequent COM-AND sessions."
  88.     ELSE
  89.        MESS "You have invoked INSTALL.CMD to change COM-AND's default settings.  INSTALL"
  90.        MESS "simplifies 1) adding/changing a COM-AND= environment variable to the AUTO-"
  91.        MESS "EXEC.BAT, 2) setting modem port and type, and 3) setting operating values"
  92.        MESS "for this and subsequent COM-AND sessions."
  93.     ENDIF
  94.     MESS " "
  95.     MESS "In order to use this script, you will need to know a few facts about your PC"
  96.     MESS "and its configuration.  You will need to know the boot drive, the modem port"
  97.     MESS "and the type of modem you will be using.  This script will help you decide"
  98.     MESS "these matters (as much as it is able) and change the DFT file accordingly."
  99.     MESS " "
  100.     MESS "You may skip this installation script by pressing ESC now (or anytime during"
  101.     MESS "the installation).  Press any other key to continue..."
  102. ;
  103. ;    Wait for a keypress
  104. ;
  105.     KEYGET S0        ; Wait for it
  106.     RETURN            ; And we're done
  107. ;
  108. ; ----- Subroutine: Set -> Inform of update autoexec.bat with COM-AND=
  109. ;
  110. Set:
  111.     ENVIRON S0 "COM-AND="   ; Look for pre-existing COM-AND= environ var
  112.     IF FOUND GOTO Already    ; If it exists, ask if its to be changed
  113. ;
  114. ;    Paint a screen
  115. ;
  116.     BOX   0,0 23,79 (default)
  117.     ATSAY 0,2 (default)   " Boot config "
  118.     ATSAY 23,25 (default) " Press ESC to cancel INSTALL "
  119.     LOCATE 2,2
  120.  
  121.     MESS "COM-AND works best if a single subdirectory is used for COM-AND files and"
  122.     MESS "scripts.  COM-AND is executing currently from the subdirectory: "
  123.     MESS " "
  124.     MESS "_SUBD"
  125.     MESS " "
  126.     MESS "COM-AND looks for files and scripts 1) in the subdirectory it finds at run-"
  127.     MESS "time, and if not there 2) in the subdirectory pointed out by the environment"
  128.     MESS "variable 'COM-AND='.  If COM-AND's working subdirectory is indicated by that"
  129.     MESS "environment variable, COM-AND may be executed in ANY subdirectory and still"
  130.     MESS "find scripts and files."
  131.     MESS " "
  132.     MESS "You may use this script to update your AUTOEXEC.BAT file to SET the environ-"
  133.     MESS "ment variable, or skip this step."
  134.     MESS " "
  135.     MESS "Select S)kip, U)pdate, or ESCape (escape cancels this script): "
  136. ;
  137. ;    Wait for a keypress
  138. ;
  139.     GET S0 1        ; Wait for a char
  140.     SWITCH S0        ; Switch on the return
  141.        CASE "S"             ; S)kip
  142.        ENDCASE
  143.        CASE "U"             ; U)pdate
  144.         GOSUB Autoexec    ; Do the update
  145.        ENDCASE
  146.        DEFAULT        ; Any other selection
  147.         SOUND 100,100
  148.         GOTO Set
  149.        ENDCASE
  150.     ENDSWITCH
  151.     RETURN            ; And continue
  152. ;
  153. ; ----- Error:    Open a window, display a message, and exit
  154. ;    S0 passes the error message
  155. ;
  156. Error:
  157.     WOPEN 10,10,12,70 (contrast)
  158.     ATSAY 10,12 (contrast) " Error "
  159.     ATSAY 11,12 (contrast) S0(0:55); Max msg width 55 chars
  160.     ATSAY 12,26 (contrast) " Press any key to continue "
  161.     ;
  162.     ;    Wait a keypress
  163.     ;
  164.     KEYGET S0            ; Wait for any key
  165.     WCLOSE
  166.     RETURN
  167. ;
  168. ; ----- Subroutine: Autoexec -> update autoexec.bat with COM-AND=
  169. ;
  170. Autoexec:
  171.     BOX   0,0 23,79 (default)
  172.     ATSAY 0,2 (default)   " AUTOEXEC update "
  173.     ATSAY 23,25 (default) " Press ESC to cancel INSTALL "
  174.     LOCATE 2,2
  175.  
  176.     MESS "Please enter the drive letter (A,B,C...) from which your PC is booted.  If"
  177.     MESS "a diskette is used for boot, please see that the boot disk is in that drive."
  178.     MESS " "
  179.     MESS "Select drive: A,B,C...: "
  180. ;
  181. ;    Wait for a keypress
  182. ;
  183.     GET S0 1        ; Wait for a char
  184.     IF NOT ALPHA S0
  185.        SOUND 100,100
  186.        GOTO Autoexec
  187.        ENDIF
  188. ;
  189. ;    Look for an autoexec.bat file on that drive
  190. ;
  191.     S1 = S0*":\AUTOEXEC.BAT"
  192.     IF ISFILE S1 GOTO Auto200
  193. ;
  194. ;    Missing autoexec.bat
  195. ;
  196.     MESS " "
  197.     MESS "No AUTOEXEC.BAT file was found on the indicated drive.  One will be created"
  198.     MESS "if you wish, or you may try another drive."
  199.     MESS " "
  200.     MESS "Select C)reate, A)nother-drive, or ESCape (escape cancels this script): "
  201. ;
  202. ;    Wait for a keypress
  203. ;
  204.     GET S0 1        ; Wait for a char
  205.     SWITCH S0        ; Switch on the return
  206.        CASE "C"             ; C)reate
  207.         GOTO AUTO100
  208.        ENDCASE
  209.        CASE "A"             ; A)nother
  210.         GOTO Autoexec    ; Do it again
  211.        ENDCASE
  212.        DEFAULT        ; Any other selection
  213.         SOUND 100,100
  214.         GOTO Autoexec
  215.        ENDCASE
  216.     ENDSWITCH
  217. ;
  218. ;    Create AUTOEXEC... get parameter for the subdirectory
  219. ;
  220. Auto100:
  221.     GOSUB GetSetVal
  222. ;
  223. ;    Create it
  224. ;
  225.     FOPENO S1 TEXT        ; Open for output
  226.     IF FAILED        ; If open failed
  227.        S0 = "Error opening "*S1
  228.        GOSUB Error
  229.        GOTO Autoexec
  230.        ENDIF
  231.     WRITE "SET COM-AND="*S0*"!"
  232.     WRITE "DATE!"
  233.     WRITE "TIME!"
  234.     WRITE "^Z"              ; ASCII EOF
  235.     FCLOSEO         ; Close it
  236.     RETURN            ; And we're done creating it
  237. ;
  238. ;    AUTOEXEC exists... append SET COM-AND= to the file
  239. ;    .. note: I don't test for the presence of SHELL or another COM-AND=
  240. ;
  241. Auto200:
  242.     GOSUB GetSetVal
  243. ;
  244. ;    Create it
  245. ;
  246.     FOPENO S1 TEXT APPEND    ; Open for output - appending at EOF
  247.     IF FAILED        ; If open failed
  248.        S0 = "Error opening "*S1
  249.        GOSUB Error
  250.        GOTO Autoexec
  251.        ENDIF
  252.     WRITE "SET COM-AND="*S0*"!"
  253.     WRITE "^Z"              ; ASCII EOF
  254.     FCLOSEO         ; Close it
  255.     RETURN            ; And we're done creating it
  256. ;
  257. ;    Subroutine: GetSETVal (S0 returns value)
  258. ;
  259. GetSetVal:
  260.     MESS "COM-AND is executing currently from the subdirectory: "
  261.     MESS " "
  262.     MESS "_SUBD"
  263.     MESS " "
  264.     MESS "Please enter the subdirectory you will use for COM-AND.  If the current sub-"
  265.     MESS "directory is the one, just press return.  Otherwise enter the new subdirec-"
  266.     MESS "tory as d:\path (d being drive letter, and path being fully qualified path)."
  267.     MESS " "
  268.     MESS "Enter COM-AND's working subdirectory (or press CR): "
  269. ;
  270. ;    Read working subdir
  271. ;
  272.     GET S0 76        ; Read response
  273.     IF NULL S0 S0="_SUBD"   ; Make default condition
  274.     RETURN
  275. ;
  276. ; ----- Subroutine: Already -> There is already a SET COM-AND=
  277. ;
  278. Already:
  279.     ENVIRON S0 "COM-AND="   ; Look for pre-existing COM-AND= environ var
  280.     IF NOT FOUND GOTO Set    ; Skip if not found
  281.     LJ S0            ; Left justify
  282.     S0 = S0&""              ; Trim trailing blanks
  283.     UPPER S0        ; Force upper case
  284.     S1 = "_SUBD"&""         ; Read current subdir
  285.     UPPER S1        ; ..
  286. ;
  287. ;    If current subdir = environment variable, no action.
  288. ;
  289.     IF STRCMP S0 S1 RETURN    ; Return if identical
  290.     IF NOT STRCMP S0(1:1) ":" and STRCMP S1(2:79) S0 RETURN
  291. ;
  292. ;    Paint a screen
  293. ;
  294.     BOX   0,0 23,79 (default)
  295.     ATSAY 0,2 (default)   " Boot config "
  296.     ATSAY 23,25 (default) " Press ESC to cancel INSTALL "
  297.     LOCATE 2,2
  298.  
  299.     PRESERVE S0
  300.     PRESERVE S1
  301.     MESS "You have already declared a subdirectory for COM-AND, through the AUTO-"
  302.     MESS "EXEC.BAT environment variable COM-AND.  It is:"
  303.     MESS " "
  304.     MESS S0
  305.     MESS " "
  306.     MESS "You are executing COM-AND now from the subdirectory:"
  307.     MESS " "
  308.     MESS S1
  309.     MESS " "
  310.     MESS "You may use this script to change your AUTOEXEC.BAT file to SET the environ-"
  311.     MESS "ment variable, or skip this step."
  312.     MESS " "
  313.     MESS "Select S)kip, C)hange, or ESCape (escape cancels this script): "
  314. ;
  315. ;    Wait for a keypress
  316. ;
  317.     GET S0 1        ; Wait for a char
  318.     SWITCH S0        ; Switch on the return
  319.        CASE "S"             ; S)kip
  320.        ENDCASE
  321.        CASE "C"             ; U)pdate
  322.         GOSUB Autoexec    ; Do the update
  323.        ENDCASE
  324.        DEFAULT        ; Any other selection
  325.         SOUND 100,100
  326.         GOTO Already
  327.        ENDCASE
  328.     ENDSWITCH
  329.     RETURN            ; And continue
  330. ;
  331. ; ----- Subroutine: Port -> Select the port we'll use
  332. ;
  333. Port:
  334.     BOX   0,0 23,79 (default)
  335.     ATSAY 0,2 (default)   " Port selection "
  336.     ATSAY 23,25 (default) " Press ESC to cancel INSTALL "
  337.     LOCATE 2,2
  338.  
  339.     MESS "COM-AND is defaulted to "*"_PARM"(11:14)*" for serial communications."
  340.     MESS " "
  341.     MESS "This may or may not be right for your PC.  At this point, you may skip"
  342.     MESS "changing the setting, select another serial port for the default, and"
  343.     MESS "optionally find ports on your machine for possible choices. "
  344.     MESS " "
  345.     MESS "Select S)kip, F)ind, or numeric port number (1,2,3,4): "
  346.     CURSOR N1,N2        ; Save current cursor
  347.  
  348.     MESS " "
  349.     MESS "Alt-P may be used at any time in CRT mode to change this default."
  350.     CURSOR N3,N4        ; Save cursor here, too
  351. ;
  352. ;    Wait for a keypress
  353. ;
  354. Port100:
  355.     ATSAY N1,N2 (default) " "
  356.     LOCATE N1,N2        ; Relocate cursor
  357.     GET S0 1        ; Wait for a char
  358.     SWITCH S0        ; Switch on the return
  359.        CASE "S"             ; S)kip
  360.        ENDCASE
  361.        CASE "F"             ; Find
  362.         LOCATE N3,N4    ; Relocate cursor
  363.         GOSUB Survey    ; Do the survey
  364.         GOTO Port100    ; And ask again
  365.        ENDCASE
  366.        CASE "1"             ; COM1
  367.         SET PORT COM1    ; Do the update
  368.        ENDCASE
  369.        CASE "2"             ; COM2
  370.         SET PORT COM2    ; Do the update
  371.        ENDCASE
  372.        CASE "3"             ; COM3
  373.         SET PORT COM3    ; Do the update
  374.        ENDCASE
  375.        CASE "4"             ; COM4
  376.         SET PORT COM4    ; Do the update
  377.        ENDCASE
  378.        DEFAULT        ; Any other selection
  379.         SOUND 100,100
  380.         GOTO Port
  381.        ENDCASE
  382.     ENDSWITCH
  383.     RETURN            ; And continue
  384. ;
  385. ; ----- Test existing ports...
  386. ;
  387. Survey:
  388.     COMPARMS S0        ; Get current settings
  389.     S0 = S0(11:14)        ; Save original value
  390.     N0 = 0            ; Make a counter of ports found
  391.     MESS " "                ; new line
  392.     SET PORT COM1
  393.     IF "_UART" GE 0
  394.        MESS " I believe COM1 is a serial port"
  395.        INC N0
  396.        ENDIF
  397.     SET PORT COM2
  398.     IF "_UART" GE 0
  399.        MESS " I believe COM2 is a serial port"
  400.        INC N0
  401.        ENDIF
  402.     SET PORT COM3
  403.     IF "_UART" GE 0
  404.        MESS " I believe COM3 is a serial port"
  405.        INC N0
  406.        ENDIF
  407.     SET PORT COM4
  408.     IF "_UART" GE 0
  409.        MESS " I believe COM4 is a serial port"
  410.        INC N0
  411.        ENDIF
  412.     SET PORT S0        ; Restore default
  413.  
  414.     IF N0 eq 0 MESS " I can't find serial ports on COM1/2/3 or 4"
  415.     RETURN
  416. ;
  417. ; ----- Subroutine: Speed -> Select the default speed we'll use
  418. ;
  419. Speed:
  420.     BOX   0,0 23,79 (default)
  421.     ATSAY 0,2 (default)   " Speed selection "
  422.     ATSAY 23,25 (default) " Press ESC to cancel INSTALL "
  423.     LOCATE 2,2
  424.  
  425.     MESS "The current serial port "*"_PARM"(11:14)*" is defaulted to "*"_PARM"(0:3)*" bps."
  426.     MESS " "
  427.     MESS "This may or may not be right the best speed for your modem.  Please select"
  428.     MESS "the HIGHEST speed your modem is able to use.  As before, you may skip this"
  429.     MESS "step if you wish."
  430.     MESS " "
  431.     MESS "Select S)kip, or from below (1 through 8): "
  432.     CURSOR N1,N2
  433.  
  434.     MESS " "
  435.     MESS "    1)   300 bps"
  436.     MESS "    2)  1200 bps"
  437.     MESS "    3)  2400 bps"
  438.     MESS "    4)  9600 bps"
  439.     MESS "    5) 14.4K bps"
  440.     MESS "    6) 19.2K bps"
  441.     MESS "    7) 38.4K bps"
  442.     MESS "    8) 57.6K bps"
  443.  
  444.     MESS " "
  445.     MESS "Alt-P may be used at any time in CRT mode to change this default."
  446. ;
  447. ;    Wait for a keypress
  448. ;
  449.     LOCATE N1,N2        ; Relocate cursor
  450.     GET S0 1        ; Wait for a char
  451.     SWITCH S0        ; Switch on the return
  452.        CASE "S"             ; Skip
  453.        ENDCASE
  454.        CASE "1"
  455.         SET BAUD 300    ; Set speed
  456.        ENDCASE
  457.        CASE "2"
  458.         SET BAUD 1200    ; Set speed
  459.        ENDCASE
  460.        CASE "3"
  461.         SET BAUD 2400    ; Set speed
  462.        ENDCASE
  463.        CASE "4"
  464.         SET RTSF ON    ; Enable RTS/CTS flow control
  465.         SET BAUD 9600    ; Set speed
  466.        ENDCASE
  467.        CASE "5"
  468.         SET RTSF ON    ; Enable RTS/CTS flow control
  469.         SET BAUD 14.4    ; Set speed
  470.        ENDCASE
  471.        CASE "6"
  472.         SET RTSF ON    ; Enable RTS/CTS flow control
  473.         SET BAUD 19.2    ; Set speed
  474.        ENDCASE
  475.        CASE "7"
  476.         SET RTSF ON    ; Enable RTS/CTS flow control
  477.         SET BAUD 38.4    ; Set speed
  478.        ENDCASE
  479.        CASE "8"
  480.         SET RTSF ON    ; Enable RTS/CTS flow control
  481.         SET BAUD 57.6    ; Set speed
  482.        ENDCASE
  483.        DEFAULT        ; Any other selection
  484.         SOUND 100,100
  485.         GOTO Speed
  486.        ENDCASE
  487.     ENDSWITCH
  488.     RETURN            ; And continue
  489. ;
  490. ; ----- Subroutine: Type -> Select the modem type we'll use
  491. ;
  492. Type:
  493.     BOX   0,0 23,79 (default)
  494.     ATSAY 0,2 (default)   " Modem type "
  495.     ATSAY 23,25 (default) " Press ESC to cancel INSTALL "
  496.     LOCATE 2,2
  497.  
  498.     MESS "When COM-AND created its defaults, modem commands were set to simple Hayes"
  499.     MESS "(tm) commands.  You may select from one of the following modem types for"
  500.     MESS "default values.  [This list is hardly comprehensive.  If your particular"
  501.     MESS "modem is not listed, or you wish to change the modem commands later, use"
  502.     MESS "setup (Alt-S) manually once in COM-AND, and refer to your modem manual.]"
  503.     MESS " "
  504.     MESS "Select S)kip, or from below (0 through 9, or a/z): "
  505.     CURSOR N1,N2
  506.  
  507.     MESS " "
  508.     MESS "1) Microcom 9624c                      a) USR Courier V.32"
  509.     MESS "2) Microcom 3296/c                     b) USR Courier V.32bix (FAX)"
  510.     MESS "3) Microcom AX 2400c                   c) USR Dual Standard"
  511.     MESS "4) Everex 2400 internal                d) Intel 14.4e and 400"
  512.     MESS "5) Everex, Evercom 24+ (MNP)           "
  513.     MESS "6) Leading Edge 2400B 1/2 internal     "
  514.     MESS "7) Prac. Periph. 2400 1/2 internal     "
  515.     MESS "8) Prac. Periph. 9600 SA               "
  516.     MESS "9) Zoom VFX V.32bis/V.42bis            "
  517.     MESS "0) BocaModem 14.4k V.32bis             "
  518.     MESS "---------------------------------------------------------------------"
  519.     MESS "y) Hayes compatible 2400 bps & below (Hayes)  } Use these settings if"
  520.     MESS "z) Generic 9600 bps & above                   } you're not sure..."
  521. ;
  522. ;    Wait for a keypress
  523. ;
  524.     LOCATE N1,N2        ; Relocate cursor
  525.     GET S0 1        ; Wait for a char
  526.     IF FIND S0 "s" RETURN   ; Skip case
  527.  
  528.     SET DPREF "ATDT"        ; Default value
  529.     SET DSUFF "!"           ; Default value
  530.     SET MCONN "CONNECT"     ; Default value
  531.     SET MHANG "ATH0!"       ; Default value
  532.     SET SOFT ON        ; Default value
  533.     SET RTSF ON        ; Enable RTS/CTS flow control for dft
  534.     SET CDRES ON        ; Default value
  535.     SWITCH S0        ; Switch on the return
  536.        CASE "1"             ; MICROCOM 9624c
  537.         SET MINIT "ATE1\C1\G0\J1\K5\N3\Q0&T5\V1V1\X1S0=0!"
  538.         SET DPREF "AT\N3DT"
  539.        ENDCASE
  540.        CASE "2"             ; MICROCOM 3296c                JP: 7/92
  541.         SET MINIT "~~~~AT\Q3\N2%C0%U!"
  542.         SET DPREF "AT\N2DT"
  543.        ENDCASE
  544.        CASE "3"             ; MICROCOM AX 2400c             DS: 11/92
  545.         SET MINIT "AT E1\J0 \Q3 \N3 &C1 &D2 S7=54 ^M"
  546.         SET DPREF "AT\N2DT"
  547.        ENDCASE
  548.        CASE "4"             ; Everex 2400 internal
  549.         SET MINIT "AT&D2S7=60!"
  550.         SET RTSF OFF    ; Disable RTS/CTS flow control
  551.        ENDCASE
  552.        CASE "5"             ; Everex, Evercom 24+ (MNP)
  553.         SET MINIT "AT\N3\Q1\K5\V1\X1\C1!"
  554.         SET DPREF "AT\N3DT"
  555.         SET RTSF OFF    ; Disable RTS/CTS flow control
  556.        ENDCASE
  557.        CASE "6"             ; Leading Edge 2400B half-size internal
  558.         SET MINIT "ATS7=60X3!"
  559.         SET RTSF OFF    ; Disable RTS/CTS flow control
  560.        ENDCASE
  561.        CASE "7"             ; Practical Peripherals 2400 half-size internal
  562.         SET MINIT "AT&C1&D2L0X3!"
  563.         SET RTSF OFF    ; Disable RTS/CTS flow control
  564.        ENDCASE
  565.        CASE "8"             ; PPI 9600 SA                   MT: 7/92
  566.         SET MINIT "AT&F&C1&D2S10=8S12=25S25=2S37=9S38=2!~~AT&B1!"
  567.        ENDCASE
  568.        CASE "9"             ; Zoom VFX V32bis/V42bix        BB: 7/92
  569.        ;*** SET MINIT "AT&F&C1&D2W2S95=3!"
  570.         SET MINIT "AT&F!~~~~AT&C1&D2S0=1S9=15S95=3!"    BB: 11/92
  571.        ENDCASE
  572.        CASE "0"             ; BocaModem 14.4k V.32bis       MT: 7/92
  573.         SET MINIT "AT&F~&C1&D2W2S7=60S11=55!"
  574.        ENDCASE
  575.        CASE "a"             ; USR Courier V.32              MT: 7/92
  576.         SET MINIT "AT&F&B1&R2S11=55S28=4X6S0=0!"
  577.        ENDCASE
  578.        CASE "b"             ; USR Courier V.32bix (FAX)     MT: 7/92
  579.         SET MINIT "AT&F!~~~ATC1E1Q0V1&A3&B1&H1&K3&R2!"
  580.         SET FLOW OFF
  581.        ENDCASE
  582.        CASE "c"             ; USR Dual Standard             JA: 11/92
  583.         SET MINIT "AT&Z!~~ATB0C1E1F1M1Q0V1X6&A3&B1&H3&R2&S1!"
  584.        ENDCASE
  585.        CASE "d"             ; Intel 14.4e and 400           DS: 11/92
  586.         SET MINIT "AT&F!~~~AT&T5~S11=60!"
  587.        ENDCASE
  588.        CASE "y"             ; Hayes compatible 2400 and below
  589.         SET MINIT "ATE0 S7=250 V1 X0 S11=55!"
  590.         SET RTSF OFF    ; Disable RTS/CTS flow control
  591.        ENDCASE
  592.        CASE "z"             ; Generic 9600 and above
  593.         SET MINIT "AT&F2&C1&D2&S7=60S11=55!"
  594.         SET RTSF ON    ; Enable RTS/CTS flow control
  595.        ENDCASE
  596.        DEFAULT        ; Any other selection
  597.         SOUND 100,100
  598.         GOTO Type
  599.        ENDCASE
  600.     ENDSWITCH
  601. ;
  602. ;    Transmit the new modem init
  603. ;
  604.     WOPEN 10,10,12,70 (defa)
  605.     ATSAY 10,12 (defa) " "*S10&" "
  606.     ATSAY 11,12 (defa) "Initializing modem..."
  607.  
  608.     TRANS "_MESC"                   ; Transmit modem esc
  609.     TRANS "_MINI"                   ; Transmit modem init string
  610.     WCLOSE
  611.     RETURN            ; And continue
  612. ;
  613. ; ----- Subroutine: Update -> update the default file
  614. ;
  615. Update:
  616.     BOX   0,0 23,79 (default)
  617.     ATSAY 0,2 (default)   " Update "
  618.     ATSAY 23,25 (default) " Press ESC to cancel INSTALL "
  619.     LOCATE 2,2
  620.  
  621.     MESS "The INSTALL script is now complete.  You may press ESC at this point to can-"
  622.     MESS "cel any settings you have made, and later invoke INSTALL with F2 (Scripts)."
  623.     MESS " "
  624.     MESS "You may run through the installation again if you wish.  Otherwise, changes"
  625.     MESS "made here will be saved for COM-AND this session and in future sesions."
  626.     MESS " "
  627.     MESS "Select A)gain, U)pdate, or ESCape (escape cancels this script): "
  628. ;
  629. ;    Wait for a keypress
  630. ;
  631.     GET S0 1        ; Wait for a char
  632.     SWITCH S0        ; Switch on the return
  633.        CASE "A"             ; A)gain
  634.         SET SUCCESS OFF
  635.        ENDCASE
  636.        CASE "U"             ; U)pdate
  637.         SET SUCCESS ON
  638.        ENDCASE
  639.        DEFAULT        ; Any other selection
  640.         SOUND 100,100
  641.         GOTO Update
  642.        ENDCASE
  643.     ENDSWITCH
  644.     RETURN            ; And continue
  645. ;
  646. ; ----- Subroutine: Coda -> last words.
  647. ;
  648. Coda:
  649.     BOX   0,0 23,79 (default)
  650.     ATSAY 0,2 (default)   " INSTALL Coda "
  651.     LOCATE 2,2
  652.  
  653.     MESS "The following manual keys may be used to set default values for COM-AND:"
  654.     MESS " "
  655.     MESS "    Alt-S: Default values (modem strings, files, and constant values)"
  656.     MESS "    Alt-O: Option settings (modem, display and programmatic flags)"
  657.     MESS "    Alt-P: Communication parameters (speed, data/stop bits, parity, port)"
  658.     MESS "    Alt-J: Menu, text and status bar color choices"
  659.     MESS "    F4:    Default download subdirectory (unqualified downloads)"
  660.     MESS " "
  661.     MESS "To dial a number, you must setup at least one dialing directory entry."
  662.     MESS "After INSTALL, use the Alt-D key to call up the dialing directory, and"
  663.     MESS "the 'r'subcommand to revise an entry.  Once the entry has been revised,"
  664.     MESS "dial it through Alt-D by its entry number."
  665.     MESS " "
  666.     MESS "There are two other directories that may be setup, F1 (accessories) and"
  667.     MESS "Alt-M (macros).  However, these do not need to be setup immediately."
  668.     MESS " "
  669.     MESS "Please refer to the document COM-AND.DOC provided with this release for"
  670.     MESS "a discussion of all the manual functions available.  A summary of key"
  671.     MESS "commands, too, may be invoked in CRT mode at any time by pressing F10."
  672.     MESS " "
  673.     MESS "Press any key to terminate"
  674. ;
  675. ;    Wait for a keypress
  676. ;
  677.     KEYGET S0        ; Wait for a char
  678.     RETURN            ; And continue
  679.